<?php use_helper('Javascript','Object')?>
<?php echo javascript_include_tag('ajax') ?>
<table width="700" height="175" border="0" align="center" id="externa">
  <td valign="top"><fieldset id="freporte">
    <legend>Consultas</legend>
    <?php echo form_tag('consultaesp/pdf');?>
      <table width="650" align="center">
        <!--DWLayoutTable-->
        <tr> 
          <td width="146" height="34">&nbsp;</td>
          <td width="151">&nbsp;</td>
          <td width="272">&nbsp;</td>
          <td width="53">&nbsp;</td>
        </tr>
        <tr id="lin_fecha" class="clase"> 
          <td height="21" valign="top">Tipo de Consultas:</td>
          <td colspan="2" valign="top"> 
            <?php
          $tipoconsulta=array(
          	'Exploratoria'=>'Exploratoria',
          	'Seguimiento'=>'Seguimiento',
          	'Todos(Seguimiento y Exploratorio)'=>'Todos');
          echo select_tag('consulta', options_for_select($tipoconsulta, 'Todos(Seguimiento y Exploratorio)'));
          ?>
          </td>
          <td></td>
        </tr>
        <tr id="trrango"> 
          <td height="21">Tipo de Rango:</td>
          <td colspan="2" valign="top"> 
            <?
					$tiporango = array(
					"0"=>"Seleccione un Tipo de Rango",
					"1"=>"rango de fechas",
					"2"=>"seleccionar un mes");

				  echo select_tag('rango', options_for_select($tiporango,"0"),array(
					'onChange' => remote_function(array(
					  'update'   => 'trrango',
					  'url'      => 'consultaesp/rango',
					  'with' => "'rangovalor='+this.value"
					  )))
					);
				?>
          </td>
              <td>&nbsp;</td>
        </tr>
        <tr  id="lin_decanato" clas="clase"> 
          <td height="21">Decanato:</td>
          <td colspan="2"> 
            <?
          $c1 = new Criteria();
          $this->decanato = DecanatoPeer::doSelect($c1);
          echo select_tag('decanato',objects_for_select($this->decanato, 'getCpDecanato', 'getNombre'),array(
			'onChange' => remote_function(array(
          	  'update'   => 'lin_programa',
              'url'      => 'consultaesp/ajax',
  			  'with' => "'ajax=1&decanat='+this.value"
			  )))
			);
          ?>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_programa" clas="clase"> 
          <td height="21">Programa:</td>
          <td colspan="2"> 
            <?
          $programas=array('primero selecione un decanato'=>'primero selecione un decanato');
		  echo select_tag('programa',options_for_select($programas));
          ?>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_semano" clas="clase"> 
          <td height="21">Semestre/Año:</td>
          <td colspan="2"><label> 
            <?
          $semanos=array('primero selecione un programa'=>'primero selecione un programa');
		  echo select_tag('semano',options_for_select($semanos));
          ?>
            </label></td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_atendido" clas="clase"> 
          <td height="21">Atendido por:</td>
          <td id="tip"> 
            <?
          $c4 = new Criteria();
          $c4->add(RolPeer::CLASIFICACION,'Especialista');
		  $c4->setLimit(2);
		  $rol=RolPeer::doSelect($c4);
          echo select_tag('tipopersonal', objects_for_select($rol,'getId','getDescripcion'),array(
			'onChange' => remote_function(array(
          	  'update'   => 'per',
              'url'      => 'consultaesp/ajax',
  			  'with' => "'ajax=3&parametro='+this.value+'&deca='+$('decanato').value"
			  )))
			);?>
          </td>
          <td align="left" valign="top" id="per"> 
            <?
          $pers=array('primero seleccione tipo de personal'=>'primero selecione tipo de personal');
          echo select_tag('atendido', options_for_select($pers));
          ?>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_motivo" clas="clase"> 
          <td height="21">Motivo:</td>
          <td colspan="2"> 
            <?php
          echo select_tag('motivo', objects_for_select(MotivoConsultaPeer::doSelect(new Criteria()),'getId','getDescripcionMotivo'));
          ?>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_turno" clas="clase"> 
          <td height="21">Turno:</td>
          <td colspan="2"> 
            <?php
          echo select_tag('turno', objects_for_select(TurnoPeer::doSelect(new Criteria()), 'getId','getNomTurno'));
          ?>
          </td>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_edad" clas="clase"> 
          <td height="21"><label> </label>
            Edad: </td>
          <td colspan="2"> 
            <?php echo input_tag('edad','','maxlength=2,size=2')?>
          <td>&nbsp;</td>
        </tr>
        <tr id="lin_sexo" clas="clase"> 
          <td height="21" valign="bottom">Sexo del Estudiante:</td>
          <td colspan="2" valign="top">
            <?php
          $tiposexo=array(
          	'Femenino'=>'Femenino',
          	'Masculino'=>'Masculino',
          	'Todos(Masculino y Femenino)'=>'Todos');
          echo select_tag('sexo', options_for_select($tiposexo, 'Todos(Masculino y Femenino)'));
          ?>
		  </td>
          <td></td>
        </tr>
        <tr id="lin_sexo" clas="clase"> 
          <td height="58"></td>
          <td></td>
          <td></td>
          <td></td>
        </tr>
        <tr> 
          <td colspan="4" align="center"> 
            <?php echo submit_tag('Generar Formato para Imprimir') ?>
            <input id="cancelar" type="reset" name="cancelar" value="Cancelar"> 
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
      </table>
    </form>
  </fieldset></td>
  </tr>
    </table>